﻿#pragma once
class FITKAbaqusHDF5AdaptorLoad
{
};

/*****************************************************************//**
 *
 * @file   FITKAbaqusHDF5AdaptorLoad.h
 * @brief  Abaqus HDF5 Load 适配器 用于读取HDF5过程中的Load解析。
 * @author fulipeng (flipengqd@yeah.net)
 * @date   2024-06-06
 *
 *********************************************************************/
#ifndef __FITKABAQUSADAPTORLOAD__H__
#define __FITKABAQUSADAPTORLOAD__H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AbstractAdaptor.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(AbaqusData, FITKDataCase)
ForwardDeclarNS(Interface, FITKAbaAbstractLoad)
ForwardDeclarNS(Interface, FITKAbaLoadConcentratedForce)
ForwardDeclarNS(Interface, FITKAbaLoadPressure)
ForwardDeclarNS(Interface, FITKAbaLoadMoment)
ForwardDeclarNS(Interface, FITKAbaLoadBodyForce)
ForwardDeclarNS(Interface, FITKAbaLoadGravity)
ForwardDeclarNS(Interface, FITKAbaLoadManager)

namespace IO
{
    /**
     * @brief Abaqus Load 读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-06-06
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorLoad : public FITKAbaqusHDF5AbstractAdaptor
    {
    public:
        explicit FITKAbaqusHDF5AdaptorLoad() = default;
        ~FITKAbaqusHDF5AdaptorLoad() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-06
         */
        QString getAdaptorClass() override;

        /**
         * @brief 设置数据结构
         * @param caseData 算例数据
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-07
         */
        void setDataCase(AbaqusData::FITKDataCase* caseData);

        /**
         * @brief 适配器读取 CFORCE
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-06
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-06
         */
        bool adaptW() override;

        /**
         * @brief   读取载荷
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoad(Interface::FITKAbaAbstractLoad* load, H5::Group& h5Group);

        /**
         * @brief   读取载荷-集中力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoadConcentratedForce(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);

        /**
         * @brief   读取载荷-弯矩
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoadMoment(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);

        /**
         * @brief   读取载荷-表面压力载荷数据存储
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoadPressure(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);

        /**
         * @brief   读取载荷-体力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoadBodyForce(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);
        /**
         * @brief   读取载荷-重力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool readLoadGravity(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);

        /**
         * @brief   写出载荷
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoad(Interface::FITKAbaAbstractLoad* load, H5::Group& h5Group);

        /**
         * @brief   读取载荷-集中力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoadConcentratedForce(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);

        /**
         * @brief   读取载荷-弯矩
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoadMoment(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);
        /**
         * @brief   读取载荷-表面压力载荷数据存储
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoadPressure(Interface::FITKAbaAbstractLoad* load, int stepID, H5::Group& h5Group);
        /**
         * @brief   读取载荷-体力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoadBodyForce(Interface::FITKAbaAbstractLoad* load,int stepID, H5::Group& h5Group);
        /**
         * @brief   读取载荷-重力
         * @param   load 载荷
         * @param   h5Group 数据块
         * @return  状态 true成功， false失败
         * @author  fulipeng (fulipengqd@yeah.net)
         * @date    2024-05-30
         */
        bool writeLoadGravity(Interface::FITKAbaAbstractLoad* load,int stepID, H5::Group& h5Group);

    private:

        /**
         * @brief 算例数据
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-07
         */
        AbaqusData::FITKDataCase* _caseData{};
    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaAbstractLoad, FITKAbaqusHDF5AdaptorLoad)

}

#endif